<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>Pardus Economy Planner</title>
  <!-- Style Sheet -->
  <link rel='stylesheet' type='text/css' href='styles/styles.css' />
</head>
<body id='body'>
  <!-- Initial Loading Screen -->
  <div id='initCenterArea' style='position: absolute; width: 200px; height: 200px; margin: auto;'>
    <img src='./images/loading_big.gif' alt='' style='text-align: center;' />
    <br />
    <span style="text-align: center;">Loading...</span>
  </div>
  <div id='mainBodyRegion' style='display: none; height: 100%; width: 100%;'>
    <!-- Top menu -->
    <span id='TopMenu'>
      <table>
        <tr>
          <td class="FakeLink" id="MainTabLink" style="width: 11.7%;"><img src="./images/navbar/main.png" alt="Main" /></td>
          <td class="FakeLink" id="CommoditiesTabLink" style="width: 28.9%;"><img src="./images/navbar/commodities.png" alt="Commodities" /></td>
          <td class="FakeLink" id="PricelistTabLink" style="width: 18.8%;"><img src="./images/navbar/pricelist.png" alt="Pricelist" /></td>
          <td class="FakeLink" id="ConfigTabLink" style="width: 15.17%;"><img src="./images/navbar/config.png" alt="Config" /></td>
          <td class="FakeLink" id="AboutTabLink" style="width: 14.16%;"><img src="./images/navbar/about.png" alt="About" /></td>
          <td class="FakeLink" id="HelpTabLink" style="width: 11.27%;"><img src="./images/navbar/help.png" alt="Help" /></td>
        </tr>
      </table>
    </span>
    <br />
    <!-- Display Area -->
    <div id='MainTab'>
      <!-- Main -->
      <div id='MapListArea'>
        <table style='border: 1px; border-style: dashed; border-color: red;'>
          <tr>
            <td colspan="2">
              Sector:
              <input type='text' id='SectorName' size='14' />
            </td>
          </tr>
          <tr>
            <td colspan='2' align='center'>
              <select id='SavedSectors' size='4' style="min-width: 100px;">
              </select>
            </td>
          </tr>
          <tr>
            <td align='center'>
              <input type='button' value='New' onclick="Panels.Main.New();" />
            </td>
            <td align='center'>
              <input type='button' value='Delete' onclick="Panels.Main.Delete();" />
            </td>
          </tr>
          <tr>
            <td align='center'>
              <input type='button' value='Load' onclick="Panels.Main.Load();" />
            </td>
            <td align='center'>
              <input type='button' value='Save' onclick="Panels.Main.Save();" />
            </td>
          </tr>
          <tr>
            <td align="center">
              <input type="button" value="Import" onclick="Panels.Main.Import();" />
            </td>
            <td align="center">
              <input type="button" value="Export" onclick="Panels.Main.Export();" />
            </td>
          </tr>
        </table>
      </div>
      <br />
      <br />
      <div id='MapArea'>
      </div>
    </div>
    <div id='CommoditiesTab'>
      <!-- Commodities -->
      <a href='javascript:void(0);' id='CommoditiesTick' onclick='Panels.Commodities.Options.Ticks = 1; Panels.Commodities.Display();' class="NavOn">Tick</a>&nbsp;&nbsp;
      <a href='javascript:void(0);' id='CommoditiesDay' onclick='Panels.Commodities.Options.Ticks = 4; Panels.Commodities.Display();' class="NavOff">Day</a>&nbsp;&nbsp;
      <a href='javascript:void(0);' id='CommoditiesWeek' onclick='Panels.Commodities.Options.Ticks = 28; Panels.Commodities.Display();' class="NavOff">Week</a>
      <br />
      <br />
      <input type="checkbox" id="CommoditiesIncludePlanets" onclick="Panels.Commodities.Display();" />
      Include Planets and Starbases
      <br />
      <input type="checkbox" id="CommoditiesOnlySelected" onclick="Panels.Commodities.Display();" />
      Only Include Selected Tiles
      <br />
      <br />
      <div id='CommodityTableArea' style='font-size: 12px;'>
      </div>
    </div>
    <div id='PricelistTab'>
      <!-- Pricelist -->
      <a href="javascript:void(0);" id="PricelistMainSectionLink">Main</a> &nbsp; &nbsp; <a href="javascript:void(0);" id="PricelistOverviewSectionLink">Overview</a>
      <br />
      <br />
      <div id="PricelistMainSection">
        <table style='border: 1px; border-style: dashed; border-color: red;'>
          <tr>
            <td colspan="2">
              Pricelist:
              <input type='text' id='PricelistName' size='14' />
            </td>
          </tr>
          <tr>
            <td colspan='2' align='center'>
              <select id='SavedPricelists' size='4' style="min-width: 100px;">
              </select>
            </td>
          </tr>
          <tr>
            <td align='center'>
              <input type='button' value='New' onclick="Panels.Pricelist.New();" />
            </td>
            <td align='center'>
              <input type='button' value='Delete' onclick="Panels.Pricelist.Delete();" />
            </td>
          </tr>
          <tr>
            <td align='center'>
              <input type='button' value='Load' onclick="Panels.Pricelist.Load();" />
            </td>
            <td align='center'>
              <input type='button' value='Save' onclick="Panels.Pricelist.Save();" />
            </td>
          </tr>
          <tr>
            <td align="center">
              <input type="button" value="Import" onclick="Panels.Pricelist.Import();" />
            </td>
            <td align="center">
              <input type="button" value="Export" onclick="Panels.Pricelist.Export();" />
            </td>
          </tr>
        </table>
        <br />
        <div id="PricelistTableArea">
        </div>
      </div>
      <div id="PricelistOverviewSection">
        <h3>
          Building Profit</h3>
        <table class="infoTable">
          <tr>
            <th>
              Building
            </th>
            <th>
              Level
            </th>
          </tr>
          <tr>
            <td>
              <select id="BuildingCalcSelect" onchange="Panels.Pricelist.CalculateBuildingProfit();">
              </select>
            </td>
            <td>
              <input type="text" size="2" value="1" id="BuildingCalcLevel" onblur="Panels.Pricelist.CalculateBuildingProfit();" />
            </td>
          </tr>
        </table>
        <table class="infoTable">
          <tr class="infoTableHeading">
            <th>
              Cost
            </th>
            <th>
              Sales
            </th>
            <th>
              Profit
            </th>
            <th>
              Per
            </th>
          </tr>
          <tr>
            <td id="BuildingCalcCostTick" style="color: Red;" align="right">
              0
            </td>
            <td id="BuildingCalcSalesTick" style="color: Green;" align="right">
              0
            </td>
            <td id="BuildingCalcProfitTick" style="color: Green;" align="right">
              0
            </td>
            <td>
              Tick
            </td>
          </tr>
          <tr>
            <td id="BuildingCalcCostDay" style="color: Red;" align="right">
              0
            </td>
            <td id="BuildingCalcSalesDay" style="color: Green;" align="right">
              0
            </td>
            <td id="BuildingCalcProfitDay" style="color: Green;" align="right">
              0
            </td>
            <td>
              Day
            </td>
          </tr>
          <tr>
            <td id="BuildingCalcCostWeek" style="color: Red;" align="right">
              0
            </td>
            <td id="BuildingCalcSalesWeek" style="color: Green;" align="right">
              0
            </td>
            <td id="BuildingCalcProfitWeek" style="color: Green;" align="right">
              0
            </td>
            <td>
              Week
            </td>
          </tr>
        </table>
        <br />
        <br />
        <h3>
          Sector Total Profit</h3>
        <table class="infoTable">
          <tr class="infoTableHeading">
            <th>
              Cost
            </th>
            <th>
              Sales
            </th>
            <th>
              Profit
            </th>
            <th>
              Per
            </th>
          </tr>
          <tr>
            <td id="SectorTotalCostTick" style="color: Red;" align="right">
              0
            </td>
            <td id="SectorTotalSalesTick" style="color: Green;" align="right">
              0
            </td>
            <td id="SectorTotalProfitTick" style="color: Green;" align="right">
              0
            </td>
            <td>
              Tick
            </td>
          </tr>
          <tr>
            <td id="SectorTotalCostDay" style="color: Red;" align="right">
              0
            </td>
            <td id="SectorTotalSalesDay" style="color: Green;" align="right">
              0
            </td>
            <td id="SectorTotalProfitDay" style="color: Green;" align="right">
              0
            </td>
            <td>
              Day
            </td>
          </tr>
          <tr>
            <td id="SectorTotalCostWeek" style="color: Red;" align="right">
              0
            </td>
            <td id="SectorTotalSalesWeek" style="color: Green;" align="right">
              0
            </td>
            <td id="SectorTotalProfitWeek" style="color: Green;" align="right">
              0
            </td>
            <td>
              Week
            </td>
          </tr>
        </table>
      </div>
    </div>
    <div id='ConfigTab'>
      <!-- Config -->
      <table id="ConfigTable">
      </table>
    </div>
    <div id='AboutTab'>
      <!-- About -->
    </div>
    <div id='HelpTab'>
      <!-- Help -->
    </div>
    <!-- Menus -->
    <div id='RightClickMenu' style='position: absolute; background-color: rgba(0, 0, 0, 0.75); left: 0; top: 0;' oncontextmenu='return false;'>
    </div>
    <div id='LeftClickMenu' style='position: absolute; background-color: rgba(0, 0, 0, 0.75); left: 0; top: 0;' oncontextmenu='return false;'>
    </div>
  </div>
  
  <!-- Javascript includes -->
  <!-- MooTools -->
  <script type="text/javascript" src="./3rdParty/Mootools-Core.js"></script>
  <script type="text/javascript" src="./3rdParty/Mootools-More.js"></script>

  <!-- Base -->
  <script type="text/javascript" src="./base.js"></script>

  <!-- Constants/Data -->
  <script type="text/javascript" src="./data/classes.js"></script>
  <script type="text/javascript" src="./data/commodities.js"></script>
  <script type="text/javascript" src="./data/constants.js"></script>
  <script type="text/javascript" src="./data/objects.js"></script>
  <script type="text/javascript" src="./data/maps.js"></script>

  <!-- 3rd Party Scripts -->
  <script type="text/javascript" src="./3rdParty/Clientcide.js"></script>
  <script type="text/javascript" src="./3rdParty/MoogressBar.js"></script>
  <script type="text/javascript" src="./3rdParty/md5.js"></script>

  <!-- Windows -->
  <script type="text/javascript" src="./windows/window.js"></script>
  <script type="text/javascript" src="./windows/loading.js"></script>
  <script type="text/javascript" src="./windows/login.js"></script>
  <script type="text/javascript" src="./windows/selectsector.js"></script>
  <script type='text/javascript'>
  
    var RightClickMenu = $("RightClickMenu");
    var LeftClickMenu = $("LeftClickMenu");

    var EventSink = new Element("span");

    function HideMenus()
    {
      RightClickMenu.set("html", "");
      LeftClickMenu.set("html", "");
    }

    window.addEvent("load", function()
    {
      $("mainBodyRegion").setStyle("display", "block");
      $("mainBodyRegion").fade("in");
      $("initCenterArea").fade("out");
    });

    var MainTabControl = new TabSwapper({
      rearrangeDOM: false,
      selectedClass: "NavOn",
      deselectedClass: "NavOff",
      tabs: $$("td[id$=TabLink]"),
      sections: $$("div[id$=Tab]"),
      smooth: false
    });
    MainTabControl.addEvent("active", HideMenus);

    var PricelistTabControl = new TabSwapper({
      rearrangeDOM: false,
      selectedClass: "NavOn",
      deselectedClass: "NavOff",
      tabs: [$("PricelistMainSectionLink"), $("PricelistOverviewSectionLink")],
      sections: [$("PricelistMainSection"), $("PricelistOverviewSection")],
      smooth: false
    });

  </script>

  <!-- Lib Scripts -->
  <script type="text/javascript" src="./lib/object.js"></script>
  <script type="text/javascript" src="./lib/text.js"></script>
  <script type="text/javascript" src="./lib/time.js"></script>

  <!-- Utilities -->
  <script type="text/javascript" src="./utility/commodities.js"></script>
  <script type="text/javascript" src="./utility/config.js"></script>
  <script type="text/javascript" src="./utility/debug.js"></script>
  <script type="text/javascript" src="./utility/object.js"></script>
  <script type="text/javascript" src="./utility/objectinfo.js"></script>
  <script type="text/javascript" src="./utility/pricelist.js"></script>
  <script type="text/javascript" src="./utility/sector.js"></script>
  <script type="text/javascript" src="./utility/server.js"></script>
  <script type="text/javascript" src="./utility/tile.js"></script>

  <!-- Import Modules -->
  <script type="text/javascript" src="./modules/import/v1.0.js"></script>
  <script type="text/javascript" src="./modules/import/current.js"></script>

  <!-- Main Scripts -->
  <script type="text/javascript" src="./panels/main/main.js"></script>
  <script type="text/javascript" src="./panels/main/loadsave.js"></script>
  <script type="text/javascript" src="./panels/main/menus.js"></script>
  <script type="text/javascript" src="./panels/main/tile.js"></script>
  <script type="text/javascript" src="./panels/commodities/commodities.js"></script>
  <script type="text/javascript" src="./panels/pricelist/loadsave.js"></script>
  <script type="text/javascript" src="./panels/pricelist/main.js"></script>
  <script type="text/javascript" src="./panels/pricelist/overview.js"></script>
  <script type="text/javascript" src="./panels/config/config.js"></script>
  <script type="text/javascript" src="./panels/about/about.js"></script>
  <script type="text/javascript" src="./panels/help/help.js"></script>
  <script type="text/javascript">

    window.addEvent("domready", LoginWindow.Show);
  
  </script>

</body>
</html>
